<?php
/**
 * Organization tournaments
 * @uses $vars['entity']
 */
 
$org = $vars['entity'];

//Get all tournaments of this organization
$tournaments = $org->getTournaments();
?>

<?php if($tournaments): ?>
<table class="elgg-table">
<thead>
	<tr>
		<th>&nbsp;</th>
		<th>Nombre</th>
	</tr>
</thead>
<tbody>
	<?php foreach ($tournaments as $entity): ?>
		<tr>
			<td width="25"><?php echo elgg_view_entity_icon($entity, 'small', array('href' => '')); ?></td>
			<td>
			<?php
				echo elgg_view("output/url",
				array('href' => $entity->getUrl() ,'text' => $entity->title));
			?>
			</td>
		</tr>
	<?php endforeach; ?>
</tbody>
</table>

<?php else: ?>
<div> Sin torneos </div>
<?php endif; ?>